import React from 'react'
import { withRouter } from 'react-router-dom'
import { NavBar, Icon } from 'antd-mobile';

const  Header = (props) => {
    return (
        <NavBar
            mode="dark"
            icon={<Icon type="left" />}
            onLeftClick={() => props.history.goBack()}
            rightContent={[
                <i
                    key="0"
                    onClick={props.onChangeClick}
                >确认</i>
                // <Icon key="0" type="search" style={{ marginRight: '16px' }} />,
            ]}
        >{props.title}</NavBar>
    )
}

export default withRouter(Header)
